package com.jeesite.modules.flow.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 流程模型信息Entity
 * @author lihp
 * @version 2024-08-29
 */
@Table(name="act_re_model", alias="a", label="流程模型信息", columns={
		@Column(name="id_", attrName="id", label="主键ID", isPK=true),
		@Column(name="rev_", attrName="rev", label="rev_", isQuery=false, isUpdateForce=true),
		@Column(name="name_", attrName="name", label="流程名称", queryType=QueryType.LIKE),
		@Column(name="key_", attrName="key", label="流程KEY", queryType=QueryType.LIKE),
		@Column(name="category_", attrName="category", label="流程分类", isQuery=false),
		@Column(name="create_time_", attrName="createTime", label="创建时间", isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="last_update_time_", attrName="lastUpdateTime", label="最后更新时间", isQuery=false, isUpdateForce=true),
		@Column(name="version_", attrName="version", label="版本号", isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="meta_info_", attrName="metaInfo", label="元数据", isQuery=false),
		@Column(name="deployment_id_", attrName="deploymentId", label="流程部署ID", isInsert=false, isQuery=false),
		@Column(name="editor_source_value_id_", attrName="editorSourceValueId", label="editor_source_value_id_", isInsert=false, isQuery=false),
		@Column(name="editor_source_extra_value_id_", attrName="editorSourceExtraValueId", label="editor_source_extra_value_id_", isInsert=false, isQuery=false),
		@Column(name="tenant_id_", attrName="tenantId", label="tenant_id_", isInsert=false, isQuery=false),
	}, orderBy="a.id_ DESC"
)
public class ActReModel extends DataEntity<ActReModel> {
	
	private static final long serialVersionUID = 1L;
	private Long rev;		// rev_
	private String name;		// 流程名称
	private String key;		// 流程KEY
	private String category;		// 流程分类
	private Date createTime;		// 创建时间
	private Date lastUpdateTime;		// 最后更新时间
	private Long version;		// 版本号
	private String metaInfo;		// 元数据
	private String deploymentId;		// 流程部署ID
	private String editorSourceValueId;		// editor_source_value_id_
	private String editorSourceExtraValueId;		// editor_source_extra_value_id_
	private String tenantId;		// tenant_id_

	public ActReModel() {
		this(null);
	}
	
	public ActReModel(String id){
		super(id);
	}
	
	public Long getRev() {
		return rev;
	}

	public void setRev(Long rev) {
		this.rev = rev;
	}
	
	@NotBlank(message="流程名称不能为空")
	@Size(min=0, max=255, message="流程名称长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="流程KEY不能为空")
	@Size(min=0, max=255, message="流程KEY长度不能超过 255 个字符")
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}
	
	@Size(min=0, max=255, message="流程分类长度不能超过 255 个字符")
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
	
	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}
	
	@Size(min=0, max=4000, message="元数据长度不能超过 4000 个字符")
	public String getMetaInfo() {
		return metaInfo;
	}

	public void setMetaInfo(String metaInfo) {
		this.metaInfo = metaInfo;
	}
	
	@Size(min=0, max=64, message="流程部署ID长度不能超过 64 个字符")
	public String getDeploymentId() {
		return deploymentId;
	}

	public void setDeploymentId(String deploymentId) {
		this.deploymentId = deploymentId;
	}
	
	@Size(min=0, max=64, message="editor_source_value_id_长度不能超过 64 个字符")
	public String getEditorSourceValueId() {
		return editorSourceValueId;
	}

	public void setEditorSourceValueId(String editorSourceValueId) {
		this.editorSourceValueId = editorSourceValueId;
	}
	
	@Size(min=0, max=64, message="editor_source_extra_value_id_长度不能超过 64 个字符")
	public String getEditorSourceExtraValueId() {
		return editorSourceExtraValueId;
	}

	public void setEditorSourceExtraValueId(String editorSourceExtraValueId) {
		this.editorSourceExtraValueId = editorSourceExtraValueId;
	}
	
	@Size(min=0, max=255, message="tenant_id_长度不能超过 255 个字符")
	public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}
	
}